package me.yobol.lintcode.easy.maxdepth;

import me.yobol.lintcode.TreeNode;

/**
 *
 * @author Yobol
 */
public class Main {
    public static void main(String[] args) {
        /*
              1
             / \ 
            2   3
               / \
              4   5
        */
        TreeNode node1 = new TreeNode(1);
        
        TreeNode node2 = new TreeNode(2);
        node1.left = node2;
        TreeNode node3 = new TreeNode(3);
        node1.right = node3;
        TreeNode root = new TreeNode(1);
        
        TreeNode node4 = new TreeNode(4);
        node3.left = node4;
        TreeNode node5 = new TreeNode(5);
        node3.right = node5;
        
        IMaxDepth md = new RecursiveMaxDepth();
        System.out.println(md.maxDepth(node1));
    }
}
